From e080f35d2579831feaf123ba713057fb5a9440eb Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 7 Jun 2019 13:03:10 +0000 Subject: [PATCH] menu section box: Add style classes for display hints This makes it easier to realize some of the new styles for popover menus. --- gtk/gtkmenusectionbox.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/gtkmenusectionbox.c b/gtk/gtkmenusectionbox.c index 7b38cfa42c..e512d7bc33 100644 --- a/gtk/gtkmenusectionbox.c +++ b/gtk/gtkmenusectionbox.c @@ -533,6 +533,7 @@ gtk_menu_section_box_new_section (GtkMenuTrackerItem *item, gtk_box_set_homogeneous (box->item_box, TRUE); gtk_orientable_set_orientation (GTK_ORIENTABLE (box->item_box), GTK_ORIENTATION_HORIZONTAL); gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (box->item_box)), GTK_STYLE_CLASS_LINKED); + gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (box->item_box)), "horizontal-buttons"); box->iconic = TRUE; if (text_direction) @@ -555,6 +556,7 @@ gtk_menu_section_box_new_section (GtkMenuTrackerItem *item, box->inline_buttons = TRUE; gtk_orientable_set_orientation (GTK_ORIENTABLE (box->item_box), GTK_ORIENTATION_HORIZONTAL); + gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (box->item_box)), "inline-buttons"); spacer = gtk_icon_new ("none"); gtk_icon_set_image (GTK_ICON (spacer), GTK_CSS_IMAGE_BUILTIN_NONE); @@ -580,6 +582,7 @@ gtk_menu_section_box_new_section (GtkMenuTrackerItem *item, { gtk_box_set_homogeneous (box->item_box, TRUE); gtk_orientable_set_orientation (GTK_ORIENTABLE (box->item_box), GTK_ORIENTATION_HORIZONTAL); + gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (box->item_box)), "circular-buttons"); box->circular = TRUE; } -- 2.30.2